package com.yy.service;

import com.yy.clientEntities.Payment;
import com.yy.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.io.Serializable;

/**
 * @author young
 * @date 2022/12/24 20:21
 * @description:
 */
/*添加fallback通配的服务降级方法类*/
@FeignClient(value = "CLOUD-HYSTRIX-PROVIDER",fallback = ProviderFeignClientServiceImpl.class)
public interface ProviderHystrixService {
    
    @GetMapping("/hystrix/use/{id}")
    Result<String> selectOne(@PathVariable("id") Integer id);

    @GetMapping("/hystrix/wait/{id}")
    Result<String> selectOneWait(@PathVariable("id") Integer id);
}
